<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>展示页面</title>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto}
        table, th, td {border: 1px solid #1b4f1b;padding: 10px}
    </style>
</head>
<body>
<div style="text-align: center">
    <span style="color: darkslategray; font-size: 30px">欢迎光临！</span>
    <hr/>
    <a th:href="@{/user/toadd}">添加</a>
    <table  border="1px">
        <tr>
            <th>id</th>
            <th>姓名</th>
            <th>密码</th>
            <th>性别</th>
            <th>生日</th>
            <th>部门</th>
            <th>操作</th>
        </tr>
        <tr th:each="qv : ${list}">
            <td th:text="${qv.id}"></td>
            <td th:text="${qv.name}"></td>
            <td th:text="${qv.age}"></td>
            <td th:text="${qv.address}"></td>
            <td th:text="${#dates.format(qv.birthday,'yyyy-MM-dd')}"></td>
            <td th:text="${qv.dname}"></td>
            <td>
                <button><a th:href="@{/user/delete(id=${qv.id})}">删除</a></button>
                <button><a th:href="@{/user/findid(id=${qv.id})}">修改</a></button>
            </td>
        </tr>
    </table>
</div>
</body>
</html>